// pages/notify/index.ts
Page({
  data: {
    notifyDetail: {}
  },
  onLoad(params) {
    this.getNotifyDetail(params.id)
  },
  async getNotifyDetail(id) {
    const {
      code,
      data: notifyDetail
    } = await wx.http.get(`/announcement/${id}`)
    if (code !== 10000) return wx.utils.toast()
    this.setData({
      notifyDetail
    })
  }
})